package com.kasax.hilog.printer;

import android.util.Log;

import com.kasax.hilog.LogConfig;
import com.kasax.hilog.LogLevel;
import com.kasax.hilog.LogManager;

/**
 * 打印到控制台
 */
public class ConsolePrinter implements ILogPrinter {
    @Override
    public void log(LogLevel logLevel, LogConfig config, String msg) {
        LogConfig logConfig = LogManager.getLogConfig();
        switch (logLevel) {
            case INFO:
                Log.i(logConfig.getLogTag(), msg);
                break;
            case DEBUG:
                Log.d(logConfig.getLogTag(), msg);
                break;
            case ERROR:
                Log.e(logConfig.getLogTag(), msg);
                break;
        }
    }
}
